﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SzCourt.Logic.BLL;
using KMFrame.Core;

namespace SzCourt.WebSite.shenwu
{
    public partial class view : System.Web.UI.Page
    {
        private string _ID = string.Empty;
        private string _Title = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                getList();
            }
        }

        private void getList()
        {
           
            this._ID = string.IsNullOrEmpty(Request.QueryString["id"]) ? "" : Request.QueryString["id"];
            if (this._ID.Length <= 0)
            {
                Response.Redirect("/shenwu/index.aspx");
            }
            SzCourt.Logic.NBL.DBEntities.Articles param = new Logic.NBL.DBEntities.Articles();
            param.ID = Convert.ToInt32(this._ID);
            

            Articles bll = new Articles();
            SzCourt.Logic.NBL.DBEntities.Articles result = (SzCourt.Logic.NBL.DBEntities.Articles)bll.GetArticlesInfo(param);

            if (result != null)
            {
                this.HTtitle.InnerHtml = result.nTitle;
                this.AddDate.InnerHtml = result.nDate.Value.ToShortDateString();
                this.WebContent.InnerHtml = result.nInfo;
                this._Title = result.nTitle;
            }
            SetPageInfo();
        }

        /// <summary>
        /// 写页面title,keyword,description
        /// </summary>
        /// <param name="mWord"></param>
        private void SetPageInfo()
        {
            //this.TabName.InnerHtml = this._Title;
            Page.Title = string.Format("{0}  - 深圳市中级人民法院", this._Title);


        }
    }
}